/**
 * Created by mill on 2017/12/3.
 */
var page = require('webpage').create();
//
// page.onConsoleMessage = function(msg) {
//   console.log('Page title is ' + msg);
// };
page.open("http://www.baidu.com", function(status) {
  var title = page.evaluate(function() {
    return document.title;
  });
  console.log('Page title is ' + title);
  phantom.exit();
});